import com.maochang.config.spring;
import com.maochang.pojo.PsSystemconfig;
import com.maochang.pojo.PsUser;
import com.maochang.service.PsSystemConfigService;
import com.maochang.service.PsUserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

import javax.annotation.Resource;
import java.util.List;

@SpringJUnitConfig(classes = spring.class)
public class CeShi {

    @Autowired(required = false)
    public PsUserService userService;
    @Resource
    private PsSystemConfigService PsSysTemConfigImpl;
    @Test
    public  void  test1(){
        PsUser loginUser  = userService.searchByUserCode2("admin");
        System.out.println(loginUser.toString()+"茂昌");
    }
    @Test
    public  void  test2(){
        int sum = 0;
        for(int i=1;i<=10;i++){
            sum += i;
        }
        System.out.println("sum = " + sum);
    }
    @Test
    public void  test3(){
        List<PsSystemconfig> psList=PsSysTemConfigImpl.ChaPsSystemConfig();
        System.out.println(psList);
    }
}
